﻿using System;
using System.Web;
using WebDotNet.HttpHandlers;
using WebDotNet.Samples.TodoList.App.Handlers;

namespace WebDotNet.Samples.TodoList.Web
{
	public class Global : HttpApplication
	{
		protected void Application_Start(object sender, EventArgs e)
		{
			registerUrls();
		}

		private void registerUrls()
		{
			RequestHandler.RegisterUrlHandler("add", typeof(Add));
			RequestHandler.RegisterUrlHandler("delete", typeof(Delete));
			RequestHandler.RegisterUrlHandler("update", typeof(Update));
			RequestHandler.RegisterUrlHandler("", typeof(Index));
			RequestHandler.RegisterUrlHandler("index", typeof(Index));
		}
	}
}